$(function () {
    $('#dg').datagrid({
        width:'100%',
        fitColumns:false,
        singleSelect:true,
        idField:'code',
        nowrap:true,
        striped:true,
        pagination:true,
        rownumbers:true,
        singleSelect:true,
        pageNumber:1,
        pageSize:5,
        pageList:[5,10,50,100],
        columns:[[
            {field:'code',title:'代号',width:100},
            {field:'name',title:'名称',width:100},
            {field:'price',title:'价格',width:100,align:'right'}
        ]],
        data:[
            {
                code:"1",
                name:"11",
                price:"12.23"
            },
            {
                code:"2",
                name:"21",
                price:"122.23"
            },
            {
                code:"3",
                name:"131",
                price:"132.23"
            },
            {
                code:"4",
                name:"141",
                price:"142.23"
            },{
                code:"5",
                name:"151",
                price:"152.23"
            },{
                code:"6",
                name:"161",
                price:"162.23"
            },{
                code:"7",
                name:"171",
                price:"172.23"
            },{
                code:"18",
                name:"181",
                price:"182.23"
            },{
                code:"19",
                name:"191",
                price:"192.23"
            },{
                code:"110",
                name:"1110",
                price:"1210.23"
            },{
                code:"111",
                name:"1111",
                price:"1211.23"
            },{
                code:"112",
                name:"1112",
                price:"1212.23"
            },
            {
                code:"113",
                name:"1113",
                price:"1213.23"
            },
            {
                code:"114",
                name:"1114",
                price:"1241.23"
            },{
                code:"115",
                name:"1115",
                price:"1214.23"
            },{
                code:"116",
                name:"1117",
                price:"1213.123"
            },{
                code:"1124",
                name:"1114",
                price:"1214.23"
            },{
                code:"1123",
                name:"1131",
                price:"12123.23"
            }
        ]
    });
})